/* === Reset general === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Cuerpo === */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f3e5f5;
  color: #212121;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Encabezado === */
header {
  background: linear-gradient(90deg, #6a1b9a, #ce93d8);
  color: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

header h1 {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* === Botón de login === */
.btn-login {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ce93d8;
  color: #212121;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.3s, color 0.3s;
  font-size: 1rem;
}
.btn-login:hover {
  background-color: #8e24aa;
  color: white;
}

/* === Hero Section === */
.hero {
  background: #ffffff;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
  border-radius: 12px;
}

/* === Contenido principal === */
.main-content {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 40px auto;
  gap: 20px;
  padding: 0 20px;
}

.posts {
  flex: 3;
}

.sidebar {
  flex: 1;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  max-height: fit-content;
}

.sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #6a1b9a;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 8px;
}

.sidebar a {
  color: #8e24aa;
  text-decoration: none;
  transition: color 0.3s ease;
}
.sidebar a:hover {
  color: #4a148c;
  text-decoration: underline;
}

/* === Tarjetas de posts === */
.post {
  background-color: #ffffff;
  border-left: 6px solid #ce93d8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.post h2 {
  font-size: 1.4rem;
  color: #6a1b9a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.post .date {
  font-size: 0.9rem;
  color: #666;
  margin-top: 6px;
}

.post p {
  margin: 12px 0 0;
  color: #444;
  display: none;
  line-height: 1.6;
}
.post.open p {
  display: block;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  background-color: #6a1b9a;
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s;
}
.read-more:hover {
  background-color: #4a148c;
}

/* === Footer === */
footer {
  background-color: #6a1b9a;
  color: white;
  text-align: center;
  padding: 15px 20px;
  font-size: 0.9rem;
  margin-top: auto;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

/* === Sección About === */
.about {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 40px 20px;
  background-color: #ffffff;
  margin-top: -20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.about-card {
  background-color: #f3e5f5;
  border-left: 6px solid #ce93d8;
  border-radius: 12px;
  padding: 20px;
  max-width: 500px;
  flex: 1 1 300px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  text-align: center;
}
.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.about-card i {
  font-size: 2rem;
  color: #6a1b9a;
  margin-bottom: 12px;
}

.about-card h3 {
  color: #6a1b9a;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.about-card p {
  color: #444;
  line-height: 1.6;
  font-size: 1rem;
}

/* === Botón compartir === */
.share-btn {
  background-color: #ce93d8;
  color: #212121;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 10px;
  transition: background-color 0.3s ease;
}
.share-btn:hover {
  background-color: #8e24aa;
  color: white;
}

/* === Barra de búsqueda === */
.search-bar {
  max-width: 600px;
  margin: 20px auto;
  display: flex;
  gap: 10px;
}
.search-bar input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background-color: #fff;
  color: #212121;
}
.search-bar button {
  padding: 10px 16px;
  background-color: #6a1b9a;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.search-bar button:hover {
  background-color: #4a148c;
}

/* === Paginación === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
}
.pagination a {
  padding: 8px 12px;
  border: 1px solid #ce93d8;
  border-radius: 4px;
  text-decoration: none;
  color: #6a1b9a;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.pagination a.active,
.pagination a:hover {
  background-color: #ce93d8;
  color: white;
}

/* === Responsive === */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }
}